package com.graduation.table.administratorsrole.relation.controller;

import com.graduation.base.Result;
import com.graduation.table.administratorsrole.relation.entity.AdministratorsRoleRelation;
import com.graduation.table.administratorsrole.relation.service.IAdministratorsRoleRelationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

 /**
 * @Description: 管理员角色关联
 * @Author: jeecg-boot
 * @Date:   2022-04-13
 * @Version: V1.0
 */
@Slf4j
@Api(tags="管理员角色关联")
@RestController
@RequestMapping("/administrators.role.relation")
public class AdministratorsRoleRelationController {
	@Autowired
	private IAdministratorsRoleRelationService administratorsRoleRelationService;


	
	/**
	 * 添加
	 *
	 * @param administratorsRoleRelation
	 * @return
	 */
	@ApiOperation(value="管理员角色关联-添加", notes="管理员角色关联-添加")
	@PostMapping(value = "/add")
	public Result<?> add(@RequestBody AdministratorsRoleRelation administratorsRoleRelation) {
		administratorsRoleRelationService.save(administratorsRoleRelation);
		return Result.OK("添加成功！");
	}


}
